home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 3863 / 3863.xpi / chrome / imacros.jar / content / smplcopy.js < prev    next >
Text File  |  2010-01-25  |  1KB  |  5 lines

  1.  
  2. /*
  3.   (c) Copyright 2006 iOpus Software GmbH - http://www.iopus.com
  4. */
  5. function confirmCopy(){if("arguments"in window&&window.arguments.length>0){window.arguments[0].copy=true;window.arguments[0].path=document.getElementById("demo-folder").value;}window.close();};function cancelCopy(){if("arguments"in window&&window.arguments.length>0){window.arguments[0].copy=false;}window.close();};function browseForFolder(){try{var textbox=document.getElementById("demo-folder");var fp=imns.Cc["@mozilla.org/filepicker;1"].createInstance(imns.Ci.nsIFilePicker);fp.init(window," ",imns.Ci.nsIFilePicker.modeGetFolder);try{var rootdir=imns.Cc["@mozilla.org/file/local;1"].createInstance(imns.Ci.nsILocalFile);rootdir.initWithPath(textbox.value);fp.displayDirectory=rootdir;}catch(x){}var rv=fp.show();if(rv==imns.Ci.nsIFilePicker.returnOK){var file=fp.file.path.toString();textbox.value=file;}}catch(e){Components.utils.reportError(e);}};window.onload=function(){var demo_folder=document.getElementById("demo-folder");demo_folder.value=im_Pref.getFilePref("defsavepath").path;};